//
//  DissertationTableViewCell.m
//  chanyou
//
//  Created by wanli on 15/1/2.
//  Copyright (c) 2015年 wanli. All rights reserved.
//

#import "DissertationTableViewCell.h"
#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)
@implementation DissertationTableViewCell
- (void)dealloc
{
    [_image_urlView release];
    [_name release];
    [_title release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.image_urlView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, SCREEN_WIDTH - 20, SCREEN_HEIGHT / 3 - 10)];
        _image_urlView.layer.cornerRadius = 3;
        _image_urlView.layer.masksToBounds = YES;
        [self.contentView addSubview:_image_urlView];
        [_image_urlView release];
        
        self.name = [[UILabel alloc] initWithFrame:CGRectMake(20, SCREEN_HEIGHT / 3 - 70, 200, 30)];
        _name.font = [UIFont boldSystemFontOfSize:24];
        [_name setTextColor:[UIColor whiteColor]];
        [self.contentView addSubview:_name];
        [_name release];
        
        self.title = [[UILabel alloc] initWithFrame:CGRectMake(20, SCREEN_HEIGHT / 3 - 40, 200, 30)];
        _title.font = [UIFont boldSystemFontOfSize:16];
        [_title setTextColor:[UIColor whiteColor]];
        [self.contentView addSubview:_title];
        [_title release];
        
        
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
